﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LoginPage.aspx.cs" Inherits="LoginPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .STYLE1 {font-size: 12px}
        .STYLE2 {color: #FFFFFF}
        .STYLE2 a{text-decoration:none; color:#ffffff}
        .STYLE2 :hover{text-decoration:underline; color:#f0ca5e}
        body {
	        background-color: #2F93E4;
        }
    </style>
    <script type="text/javascript">
        function CusExtWin(visible, id) {
            if (document.layers) {
                theObj = eval("document.layers[\'" + id + "\']");
                if (theObj) {
                    theObj.visibility = visible;
                }
            }
            else if (document.all) {
                if (visible == 'show') visible = 'visible';
                if (visible == 'hide') visible = 'hidden';
                theObj = eval("document.all[\'" + id + "\']");
                if (theObj) {
                    theObj.style.visibility = visible;
                }
            }
        }
        function OnCancleClick() {
//            document.getElementById("QName").value = "";
//            document.getElementById("QP1").value = "";
//            document.getElementById("QP2").value = "";
            CusExtWin('hide', 'boysoft');
        }
        function OnAddQuickClick() {
            var name = document.getElementById("QName").value;
            if (!name || name == "") {
                alert("用户名不能为空");
                return false;
            }
            var p1 = document.getElementById("QP1").value;
            if (!p1 || p1 == "") {
                alert("密码不能为空");
                return false;
            }
            var p2 = document.getElementById("QP2").value;
            if (!p2 || p2 == "") {
                alert("确认密码不能为空");
                return false;
            }
            if (p1 != p2) {
                alert("密码不匹配");
                return false;
            }
//            CusExtWin('hide', 'boysoft');
//            document.getElementById("QName").value = "";
//            document.getElementById("QP1").value = "";
//            document.getElementById("QP2").value = "";
            return true;
        }
        function OnError(result) {
            alert("出错啦！【" + result + "】");
        }
    </script>
</head>
<body>
<form id="form1" runat="server">
    <table width="365" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <asp:Image ID="LogoImage" runat="server" 
                    ImageUrl="~/Account/publicResource/dl1.gif" /></td>
        </tr>
        <tr>
            <td bgcolor="#16548F" height="97">
                    <asp:ScriptManager ID="ScriptManager" runat="server">
                        <Services>
                            <asp:ServiceReference Path="~/webServiceASMX/RegisterWebService.asmx" />
                        </Services>
                    </asp:ScriptManager>
                    <table width="365" cellspacing="5">
                        <tr>
                            <td width="91"><div align="right" class="STYLE1">用户名：</div></td>
                            <td width="180"><asp:TextBox ID="NameTextBox" runat="server" Width="160" /></td>
                            <td width="94"><asp:ImageButton ID="LoginImageButton" runat="server" 
                                    ImageUrl="~/Account/publicResource/a.gif" onclick="LoginImageButton_Click" /></td>
                        </tr>
                        <tr>
                            <td><div align="right" class="STYLE1">密&nbsp;&nbsp;&nbsp;&nbsp;码：</div></td>
                            <td><asp:TextBox ID="PwdTextBox" runat="server" TextMode="Password" Width="160" /></td>
                            <td><asp:ImageButton ID="QuickRegImageButton" runat="server" ImageUrl="~/Account/publicResource/a2.gif" OnClientClick="CusExtWin('show', 'boysoft');return false;" /></td>
                        </tr>
                        <tr>
                            <td colspan="3" bgcolor="#16548F">
                                <table width="89%" border="0" align="center" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td><div align="right" class="STYLE1 STYLE2">
                                                <asp:LinkButton ID="RegLinkButton" runat="server" 
                                                    PostBackUrl="~/Account/RegisterPage.aspx">未注册？请点击注册>></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
            </td>
        </tr>
        
        <tr>
            <td bgcolor="#16548F"><asp:Label ID="ErrorLabel" ForeColor="Red" runat="server"></asp:Label></td>
        </tr>
        <tr>
            <td>
                <asp:Image ID="BottomImage" runat="server" 
                    ImageUrl="~/Account/publicResource/dl2.gif" /></td>
        </tr>
    </table>
    <div id="boysoft" style="HEIGHT: 80px; LEFT: 309px; POSITION: absolute; TOP: 150px; VISIBILITY: hidden; WIDTH: 300px; Z-INDEX: 1"> 
      <table bgcolor="#666666" border="1" width="100%" style="height: 80px">
        <tbody> 
            <tr>
                <td height="65" width="100%"> 
                    <table width="99%" style="height: 80px">
                        <tbody>
                            <tr>
                                <td>登录名：</td>
                                <td><asp:TextBox ID="QName" runat="server"></asp:TextBox></td>
                            </tr>
                            <tr> 
                                <td>密码：</td>
                                <td><asp:TextBox ID="QP1" runat="server" TextMode="Password"></asp:TextBox></td>
                            </tr>
                            <tr> 
                                <td>确认密码：</td>
                                <td><asp:TextBox ID="QP2" runat="server" TextMode="Password"></asp:TextBox></td>
                            </tr>
                            <tr align="center"> 
                                <td height="23" width="100%">
                                    <asp:Button ID="AddQuickButton" runat="server" Text="快速注册" onclick="AddQuickButton_Click" OnClientClick="if(!OnAddQuickClick()){return false;}" />
                                </td>
                                <td height="23" width="100%">
                                    <input id="CancleQuickButton" onclick="OnCancleClick()" type="button" value="关 闭" />
                                </td>
                            </tr>
                        </tbody> 
                    </table>
                </td>
            </tr>
        </tbody> 
      </table>
    </div>
</form>
</body>
</html>
